🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / domain / src / commonTest / kotlin / org / meshtastic / core / domain / usecase / settings / InstallProfileUseCaseTest.kt
Displaying Raw • Download
core/domain/src/commonTest/kotlin/org/meshtastic/core/domain/usecase/settings/InstallProfileUseCaseTest.kt 1230c36cdbe2ac71a9b64e8a70414f9b7eaf842e (1230c36c) Text, 4.72 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.domain.usecase.settings
Tff7b72import T7ee787kotlinx.coroutines.test.runTest
Tff7b72import T7ee787org.meshtastic.core.testing.FakeRadioController
Tff7b72import T7ee787org.meshtastic.proto.Config.BluetoothConfig
Tff7b72import T7ee787org.meshtastic.proto.Config.DeviceConfig
Tff7b72import T7ee787org.meshtastic.proto.Config.DisplayConfig
Tff7b72import T7ee787org.meshtastic.proto.Config.LoRaConfig
Tff7b72import T7ee787org.meshtastic.proto.Config.NetworkConfig
Tff7b72import T7ee787org.meshtastic.proto.Config.PositionConfig
Tff7b72import T7ee787org.meshtastic.proto.Config.PowerConfig
Tff7b72import T7ee787org.meshtastic.proto.Config.SecurityConfig
Tff7b72import T7ee787org.meshtastic.proto.DeviceProfile
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.AmbientLightingConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.AudioConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.CannedMessageConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.DetectionSensorConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.ExternalNotificationConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.MQTTConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.NeighborInfoConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.PaxcounterConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.RangeTestConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.RemoteHardwareConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.SerialConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.StatusMessageConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.StoreForwardConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.TAKConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.TelemetryConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig.TrafficManagementConfig
Tff7b72import T7ee787org.meshtastic.proto.User
Tff7b72import T7ee787kotlin.test.BeforeTest
Tff7b72import T7ee787kotlin.test.Test
Tff7b72import T7ee787kotlin.test.assertTrue
Tff7b72class T56d364InstallProfileUseCaseTest Tb4b4b4{
Tff7b72private Tff7b72lateinit Tff7b72var Te6edf3radioControllerTb4b4b4: Te6edf3FakeRadioController
Tff7b72private Tff7b72lateinit Tff7b72var Te6edf3useCaseTb4b4b4: Te6edf3InstallProfileUseCase
Tf0883e@BeforeTest
Tff7b72fun Td2a8ffsetUpTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3radioController Tff7b72= Te6edf3FakeRadioControllerTb4b4b4(Tb4b4b4)
Te6edf3useCase Tff7b72= Te6edf3InstallProfileUseCaseTb4b4b4(Te6edf3radioControllerTb4b4b4)
Tb4b4b4}
Tf0883e@Test
Tff7b72fun Td2a8ff`invoke calls begin and commit edit settings`Tb4b4b4(Tb4b4b4) Tff7b72= Te6edf3runTest Tb4b4b4{
Te6edf3useCaseTb4b4b4(T79c0ff1T79c0ff2T79c0ff3T79c0ff4Tb4b4b4, Te6edf3DeviceProfileTb4b4b4(Tb4b4b4)Tb4b4b4, Te6edf3UserTb4b4b4(Tb4b4b4)Tb4b4b4)
Te6edf3assertTrueTb4b4b4(Te6edf3radioControllerTb4b4b4.Te6edf3editSettingsCalledTb4b4b4)
Tb4b4b4}
Tf0883e@Test
Tff7b72fun Td2a8ff`invoke installs all sections of a full profile`Tb4b4b4(Tb4b4b4) Tff7b72= Te6edf3runTest Tb4b4b4{
Tff7b72val Te6edf3profile Tff7b72=
Te6edf3DeviceProfileTb4b4b4(
Te6edf3long_name Tff7b72= Ta5d6ff"Ta5d6ffFull NodeTa5d6ff"Tb4b4b4,
Te6edf3short_name Tff7b72= Ta5d6ff"Ta5d6ffFULLTa5d6ff"Tb4b4b4,
Te6edf3config Tff7b72=
Te6edf3orgTb4b4b4.Te6edf3meshtasticTb4b4b4.Te6edf3protoTb4b4b4.Te6edf3LocalConfigTb4b4b4(
Te6edf3device Tff7b72= Te6edf3DeviceConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3position Tff7b72= Te6edf3PositionConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3power Tff7b72= Te6edf3PowerConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3network Tff7b72= Te6edf3NetworkConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3display Tff7b72= Te6edf3DisplayConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3lora Tff7b72= Te6edf3LoRaConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3bluetooth Tff7b72= Te6edf3BluetoothConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3security Tff7b72= Te6edf3SecurityConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3module_config Tff7b72=
Te6edf3orgTb4b4b4.Te6edf3meshtasticTb4b4b4.Te6edf3protoTb4b4b4.Te6edf3LocalModuleConfigTb4b4b4(
Te6edf3mqtt Tff7b72= Te6edf3MQTTConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3serial Tff7b72= Te6edf3SerialConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3external_notification Tff7b72= Te6edf3ExternalNotificationConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3store_forward Tff7b72= Te6edf3StoreForwardConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3range_test Tff7b72= Te6edf3RangeTestConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3telemetry Tff7b72= Te6edf3TelemetryConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3canned_message Tff7b72= Te6edf3CannedMessageConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3audio Tff7b72= Te6edf3AudioConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3remote_hardware Tff7b72= Te6edf3RemoteHardwareConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3neighbor_info Tff7b72= Te6edf3NeighborInfoConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3ambient_lighting Tff7b72= Te6edf3AmbientLightingConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3detection_sensor Tff7b72= Te6edf3DetectionSensorConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3paxcounter Tff7b72= Te6edf3PaxcounterConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3statusmessage Tff7b72= Te6edf3StatusMessageConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3traffic_management Tff7b72= Te6edf3TrafficManagementConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3tak Tff7b72= Te6edf3TAKConfigTb4b4b4(Tb4b4b4)Tb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3fixed_position Tff7b72= Te6edf3orgTb4b4b4.Te6edf3meshtasticTb4b4b4.Te6edf3protoTb4b4b4.Te6edf3PositionTb4b4b4(Tb4b4b4)Tb4b4b4,
Tb4b4b4)
Te6edf3useCaseTb4b4b4(T79c0ff1T79c0ff2T79c0ff3T79c0ff4Tb4b4b4, Te6edf3profileTb4b4b4, Te6edf3orgTb4b4b4.Te6edf3meshtasticTb4b4b4.Te6edf3protoTb4b4b4.Te6edf3UserTb4b4b4(Te6edf3long_name Tff7b72= Ta5d6ff"Ta5d6ffOldTa5d6ff"Tb4b4b4)Tb4b4b4)
Te6edf3assertTrueTb4b4b4(Te6edf3radioControllerTb4b4b4.Te6edf3editSettingsCalledTb4b4b4)
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.07s